package com.offcn.bean;

import javax.validation.constraints.Pattern;

public class User {
    private Integer id;
    @Pattern(regexp = "^[\\u4E00-\\u9FA5A-Za-z0-9_]{3,10}$",
            message = "中文、英文、数字包括下划线，位数3到10位")
    private String username;
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{3,10}$",
            message = "必须包含大小写字母和数字的组合，可以使用特殊字符，长度在3-10之间")
    private String password;

    private Integer limit;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }
}